control
Class Logic

java.lang.Object
  extended by control.Logic

public class Logic
extends java.lang.Object

Starts the computation of the simulation. Saves or load if needed for simulation

Author:

Field Summary
static State s
           
static boolean saved
           
static double weather
           
static double weekweather
           
 
Constructor Summary
Logic()
           
 
Method Summary
static void begin()
          Call to start the simulation
static void loadState(java.lang.String filename)
          Loads state from the file
static void runSimulation()
          Runs the simulation for the week and updates the field values (Calculates the success rate)
static void saveState(java.lang.String filename)
          Saves the state to a file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s

public static State s

weather

public static double weather

weekweather

public static double weekweather

saved

public static boolean saved
Constructor Detail

Logic

public Logic()
Method Detail

begin

public static void begin()
Call to start the simulation


runSimulation

public static void runSimulation()
Runs the simulation for the week and updates the field values (Calculates the success rate)


saveState

public static void saveState(java.lang.String filename)
Saves the state to a file

Parameters:
filename: - File namespace the file is saved to

loadState

public static void loadState(java.lang.String filename)
Loads state from the file

Parameters:
filename: - loads the field values from the state